/**
 * <p>Title: TimelySMS.java</p>
 * <p>Description: </p>
 * <p>Copyright: Baosight Software LTD.co Copyright (c) 2002</p>
 * <p>Company: Baosight Software</p>
 * @author 张志芳
 * @version 1.0
 * <pre>Histroy:
 *          2012-6-26 上午07:40:19  张志芳  Create
 *</pre>
 */
package com.baosight.sczx.common.zm.basetools.listener;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.baosight.iplat4j.dao.Dao;
import com.baosight.sczx.common.zm.cInterface.ct.SMSModel;

/**
 * 及时消息生成
 * <p>Title: TimelySMS.java</p>
 * <p>Description: </p>
 * <p>Copyright: Baosight Software LTD.co Copyright (c) 2002</p>
 * <p>Company: Baosight Software</p>
 * @author 张志芳
 * @version 1.0
 * <pre>Histroy:
 *          2012-6-26 上午07:40:19  张志芳  Create
 *</pre>
 */
public class TimelySMS {
	private Dao dao;
	private SMSModel _model;
	
	public TimelySMS(Dao dao){
		this.dao = dao;
		_model = new SMSModel(dao);
	}
	
	/**
	 * 发送及时短信
	 * <p>Function: SendSMS</p>
	 * <p>Description: </p>
	 * <p>return value:void</p>
	 * <p>throws Exception:</p>
	 * <p>History:
	 *    2012-6-28上午08:52:45 张志芳
	 * </p>
	 *
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public void SendSMS()throws Exception{
		Map _map = new HashMap();
		_map.put("fdSmsType", "即时消息");
		_map.put("fdStatus", "在用");
		List<Map> list=dao.query("ZMCTSmsModel.querySMSModel", _map);	
		for(int i=0; i<list.size(); i++)			
		{
			_model.insertTimelySMS(list.get(i));
		}
	}
}
